
package com.guns.repository;
import com.guns.domain.Car;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

public interface Apirepository extends JpaRepository<Car,Integer> {
    @Transactional
    @Modifying(clearAutomatically = true)
    @Query(value = "update sys_car p set p.status =?1 where p.number = ?2 and p.status=?3",nativeQuery = true)
    void updateByNum(int status,String number,int astatus);
}

